package com.wangsb;

/**
 * @Author: shenbing.wang@hand-china.com
 * @CreateDate: 2021/5/23 15:43
 * @Description:
 */
public class FifthQuestion {
    public static void main(String[] args) {

        // 使用双重循环实现五子棋游戏棋盘的绘制， 棋盘界面的具体效果如下
        for (int i = 0; i < 17; i++) {
            for (int j = 0; j < 17; j++) {
                if (i == 0 && j == 0) {
                    System.out.print("   ");
                } else if (0 == i && j <= 10) {
                    System.out.print((j - 1) + "  ");
                } else if (0 == i) {
                    System.out.print((char) (j - 11 + 97) + "  ");
                } else if (j == 0 && i <= 10) {
                    System.out.print((i - 1) + "  ");
                } else if (0 == j) {
                    System.out.print((char) (i - 11 + 97) + "  ");
                } else {
                    System.out.print("+  ");
                }
            }
            System.out.println();
        }
    }
}
